﻿using System;
using System.Collections.Generic;
using System.Text;
using TYG.NetWorking.Common.Basic;
using TYG.NetWorking.Common.Package;

namespace TYG.NetWorking.Common.EventManager
{
    public class LoginEvent : BaseMessageEvent
    {
        /// <summary>
        /// 登录请求
        /// </summary>
        /// <param name="login"></param>
        public void LoginRequest(LoginReq login)
        {
            this.message.Req = new BasicReq();
            this.message.Req.LoginReq = login;
            this.Send((int)ActionType.Login, messageStatus.AllTeam);
        }
        /// <summary>
        /// 登录成功返回请求
        /// </summary>
        /// <returns></returns>
        public Header LoginResponse()
        {
            var data = this.Receive();
            return data.Resp.Header;
        }
        

    }
}
